package com.hrvsr.common;

import java.util.Iterator;

import org.apache.commons.lang3.builder.HashCodeBuilder;

import com.hrvsr.common.consts.HttpMethods;

public class SimpleGetRequest implements Request {
	private static final long serialVersionUID = 201L;

	private String method = HttpMethods.GET;
	private String url = null;
	private ExtraInfo extras = new ExtraInfo();

	public SimpleGetRequest(String url) {
		super();
		this.url = url;
	}

	@Override
	public String getMehtod() {
		return method;
	}

	@Override
	public String getUrl() {
		return url;
	}

	@Override
	public Object getExtraInfo(String key) {
		return extras.get(key);
	}

	@Override
	public void putExtraInfo(String key, Object object) {
		extras.put(key,object);
	}

	@Override
	public int hashCode() {
		return new HashCodeBuilder().append(method).append(url).build();
	}

	@Override
	public Iterator<NameValuePair> paramIterator() {
		return null;
	}

	@Override
	public String toString() {
		return "SimpleGetRequest [method=" + method + ", url=" + url + "]";
	}
	
	

}
